using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace GameStateManagement.View.Rendering
{
    public abstract class Renderer
    {
        #region Constructors 

        protected Renderer(RenderManager manager)
        {
            Manager = manager;
        }

        #endregion

        #region Fields

        protected readonly RenderManager Manager;

        #endregion

        #region Properties

        public string Name { get; set; }
  
        #endregion

        #region Public Methods

        public abstract void Render(IRenderable renderable);

        public abstract void Render(IRenderable renderable, string textureName);

        public static Vector2 GetOrigin(Texture2D texture)
        {
            return new Vector2((float)texture.Width / 2, (float)texture.Height / 2);
        }

        #endregion

    }
}
